#include "RunLaserAction.h"


void RunLaserAction::update(float elapsed) {
	if ( m_Core->laser().isRunning() ) {
		int row = m_Core->laser().getRow();
		if ( row >= 0 && m_CurrentRow != row ) {
			m_CurrentRow = row;
			int p = m_Core->map().cleanRow(row);
			m_Core->score().points += p * p * 10;
			m_Core->score().coverage = m_Core->gutter().getCoverage();
			m_Core->hud().setScore(m_Core->score().points);
		}
	}
}